const request = require('./request')

const BASE_URL = '/video'

/**
 * 分页查询视频解析列表
 * @param {*} current 
 * @param {*} size 
 * @returns 
 */
function getPage(current = 1, size = 10) {
  return request.get(BASE_URL + '/record/page/list', { 
    current, size 
  })
}

/**
 * 逻辑删除视频解析记录
 * @param {*} recordId 
 * @returns 
 */
function logicDeleteRecord(recordId) {
  return request.delete(BASE_URL + '/record/'+ recordId)
}


/**
 * 提取视频
 * @param {*} param 
 */
function extractVideo(param) {
  // 这里用POST方式，参数放body
  return request.post(BASE_URL + '/extract', param);
}
module.exports = {
  getPage,
  logicDeleteRecord,
  extractVideo
} 